package com.example.reader.controller;

import com.example.reader.common.Result;
import com.example.reader.entity.Orders;
import com.example.reader.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/orders")
public class OrderController {
    @Autowired
    private OrderService orderService;

    //订阅书籍
    @PostMapping("/add")
    public Result add(@RequestBody Orders orders){
        orderService.add(orders);
        return Result.success();
    }
}
